package com.service;

import com.bean.Emp;
import com.dao.EmpMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class EmpService {
    @Autowired
    EmpMapper empMapper;
    public List<Emp> getAllEmp(Map map){
        return empMapper.getAllEmp(map);
    }
    public void addEmp(Emp emp){
        empMapper.insertEmp(emp);
    }
    public void updateEmp(Emp emp){
        empMapper.updateEmp(emp);
    }

    public void deleteEmp(int id) {
        empMapper.deleteEmp(id);
    }
    public void deleteManyEmp(List<Integer> ids) {
        empMapper.deleteManyEmp(ids);
    }
}
